﻿using Newtonsoft.Json.Serialization;

namespace PMS.Web.Framework.Controllers
{
    /// <summary>
    /// newtonsoft's Json.NET library
    /// The following contract resolver will convert all keys to lowercase:
    /// </summary>
    public class LowercaseContractResolver : DefaultContractResolver
    {
        protected override string ResolvePropertyName(string propertyName)
        {
            return propertyName.ToLower();
        }
    }
}
